Skip to content

Cache tooltip assets - #10311

Open
meehl wants to merge 1 commit into
PathOfBuildingCommunity:devfrom
meehl:preload-tooltip-headers
Open

Cache tooltip assets#10311
meehl wants to merge 1 commit into
PathOfBuildingCommunity:devfrom
meehl:preload-tooltip-headers

Conversation

@meehl

@meehl meehl commented Aug 30, 2026

Copy link
Copy Markdown
Contributor

Cache tooltip header, influence icon, and separator image handles.

This solves two problems:

  • Item influence icons were being allocated and loaded on every frame while the tooltip was open.
  • Every tooltip was allocating and loading its own header and separator images, even though most of them share the same images.

As a consequence, tooltip assets now stay loaded and do not get freed. This is fine because they're fairly small and commonly used anyway.

This solves two problems:
- Item influence icons were being allocated and loaded on **every**
  frame while the tooltip was open.
- Every tooltip was allocating and loading its own header and separator
  images, even though most of them share the same images. This change
  significantly reduces the number of disk loads and GPU texture
  allocations/frees.

As a consequence, tooltip assets now stay loaded and do not get freed.
This is fine because they're fairly small and commonly used anyway.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant